Skip to content

Improve descriptions for X/Y schemas#261474

Draft
markov00 wants to merge 2 commits intoelastic:mainfrom
markov00:2026_04_07-better_descriptions_for_x_y
Draft

Improve descriptions for X/Y schemas#261474
markov00 wants to merge 2 commits intoelastic:mainfrom
markov00:2026_04_07-better_descriptions_for_x_y

Conversation

@markov00
Copy link
Copy Markdown
Contributor

@markov00 markov00 commented Apr 7, 2026

Summary

Improved descriptions for the X and Y properties to avoid LLM confusing X and Y when handling charts oriented in a different way.

fix #260632

@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

{
meta: {
description:
'Dependent axis (metric): the measured values. Always use y for metrics regardless of chart orientation — chart orientation is controlled by the type field (e.g. bar vs bar_horizontal), not by swapping x and y.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, let's check if that works, but I feel like this is a lot of tokens with a description this long. I wonder if only adding "range" and "domain" wouldn't be good enough 😅 I'll try to check tomorrow!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't even considering token length here, just asked to produce and validate a good description that was non ambigious for an LLM.
I would really not recommend changing the description to reduce the number of tokens just for that, this is not something we evaluate and control. If we need this level of optimization probably we should create a "llm_description" meta that is minimal and just works for LLMs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I just checked and unfortunately this description doesn't affect the agent action at all 🫠 I tried to tweak it, but looks like nothing works and we have to do it at agent level. Please feel free to merge this, we'll fix it on our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dashboards in chat] Sonnet 4.6 always gets bar charts wrong

4 participants